package net.csdn.business.webhook.config;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import net.csdn.business.common.domain.vo.WebHookEvent;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @ClassName WebHookEventConfig
 * @Description nacos配置的webHook的event信息
 * @Author zhangyl
 * @Date 2023/4/26 11:04
 */
@Getter
@Setter
@NoArgsConstructor
@Component
@ConfigurationProperties(prefix = "webhook.event")
public class WebHookEventConfig {
    private Map<String, List<WebHookEvent>> list = new LinkedHashMap<>();

    /**
     * 向云校仓库同步数据的event：push,pull_requests
     */
    private Set<String> project;
}
